package com.abaaba.project2.service.serviceImpl;

import com.abaaba.project2.bean.Region;
import com.abaaba.project2.bean.RegionExample;
import com.abaaba.project2.mapper.RegionMapper;
import com.abaaba.project2.service.WxRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WxRegionServiceImpl implements WxRegionService {
    @Autowired
    RegionMapper regionMapper;

    @Override
    public List<Region> queryRegionByPid(Integer pid) {
        RegionExample regionExample = new RegionExample();
        RegionExample.Criteria criteria = regionExample.createCriteria();
        criteria.andPidEqualTo(pid);
        return regionMapper.selectByExample(regionExample);
    }
}
